using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
namespace SRW.SetInfo
{
   class SetNewsimage
   {
      public static SqlCommand Set_Newsimage_Data(SqlCommand cmd, Newsimage mNewsimage,bool CheckPk)
      {
         
         if (!(string.IsNullOrEmpty(mNewsimage.pkID.ToString())))
         {
            if (CheckPk)
               cmd.Parameters.AddWithValue("@pkID", mNewsimage.pkID);
         }
         if (!(string.IsNullOrEmpty(mNewsimage.imaplace.ToString())))
         {
         cmd.Parameters.AddWithValue("@imaplace", mNewsimage.imaplace);
         }
         if (!(string.IsNullOrEmpty(mNewsimage.newsID.ToString())))
         {
         cmd.Parameters.AddWithValue("@newsID", mNewsimage.newsID);
         }
         if (!(string.IsNullOrEmpty(mNewsimage.newsname.ToString())))
         {
         cmd.Parameters.AddWithValue("@newsname", mNewsimage.newsname);
         }
         return cmd;
      }
   }
}
